
# After typing 'make' a few hundred times,
# instead of the 'mvn install',
# this little helping file shall contribute
# to avoiding frustration.

VERSION=$(shell grep '<version>' pom.xml | head -1 | tr '<>' '\n' | egrep '^[0-9]' | tr -d '\n' )
TARGET=$(shell grep '<artifactId>' pom.xml | head -1 | cut -f2 -d\>|cut -f1 -d\< )

all: install

install:
	mvn install

commit: install
	svn commit

clean:
	mvn clean

tests:
	#java -cp target/$(TARGET)-$(VERSION).jar:/usr/share/java/jdom1.jar de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription http://pc02.inb.uni-luebeck.de:8080/~moeller/sharedRepository/xml.php?table=usecase&usecaseid=HelloWorld
	java -cp target/$(TARGET)-$(VERSION).jar:/usr/share/java/jdom1.jar de.uni_luebeck.inb.knowarc.usecases.UseCaseDescription file:hello.xml

tests_re:
	java -cp target/taverna-knowarc-processor-$(VERSION).jar de.uni_luebeck.inb.knowarc.grid.re.RuntimeEnvironmentConstraint compare MUSTANG-3.0-1 MUSTANG-3.0
	java -cp target/taverna-knowarc-processor-$(VERSION).jar de.uni_luebeck.inb.knowarc.grid.re.RuntimeEnvironmentConstraint "help"
	java -cp target/taverna-knowarc-processor-$(VERSION).jar de.uni_luebeck.inb.knowarc.grid.re.RuntimeEnvironmentConstraint ">=" MUSTANG-3.0-1 MUSTANG-3.0
	java -cp target/taverna-knowarc-processor-$(VERSION).jar de.uni_luebeck.inb.knowarc.grid.re.RuntimeEnvironmentConstraint ">=" MUSTANG-3.0-1 MUSTANG-3.0-2
	java -cp target/taverna-knowarc-processor-$(VERSION).jar de.uni_luebeck.inb.knowarc.grid.re.RuntimeEnvironmentConstraint "<=" MUSTANG-3.0-1 BAERENTOETER-3.0
	java -cp target/taverna-knowarc-processor-$(VERSION).jar de.uni_luebeck.inb.knowarc.grid.re.RuntimeEnvironmentConstraint ">" MUSTANG-3.0-1 MUSTANG-3.0
	java -cp target/taverna-knowarc-processor-$(VERSION).jar de.uni_luebeck.inb.knowarc.grid.re.RuntimeEnvironmentConstraint ">" MUSTANG-3.0-1 MUSTANG-3.0-2
	java -cp target/taverna-knowarc-processor-$(VERSION).jar de.uni_luebeck.inb.knowarc.grid.re.RuntimeEnvironmentConstraint "<" MUSTANG-3.0-1 MUSTANG-3.0
	java -cp target/taverna-knowarc-processor-$(VERSION).jar de.uni_luebeck.janitor.grid.re.RuntimeEnvironmentConstraint "<" MUSTANG-3.0-1 MUSTANG-3.0-2
	java -cp target/taverna-knowarc-processor-$(VERSION).jar de.uni_luebeck.janitor.grid.re.RuntimeEnvironmentConstraint "<" MUSTANG-3.0-1 BAERENTOETER-3.0
	java -cp target/taverna-knowarc-processor-$(VERSION).jar de.uni_luebeck.janitor.grid.re.RuntimeEnvironmentConstraint "<" MUSTANG-3.0-1 BAERENTOETER-3.0


.PHONY: all commit install clean
